<template>
  <div>
    <!--top和nav是固定的-->
    <div class="top">
      <span class="logo">优音乐</span>
      <span class="download">下载APP</span>
    </div>

    <div class="nav">
      <router-link to="/recommend" class="link">推荐</router-link>
      <router-link to="/hotsong" class="link">热歌榜</router-link>
      <router-link to="/search" class="link">搜索</router-link>
    </div>
    <div class="router-view">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {};
</script>

<style scoped>
/* scoped不产生冲突 */
.top {
  width: 100%;
  height: 80px;
  background-color: #ff4b00;
  position: fixed;
  top: 0;
  left: 0;
  /* 覆盖 */
  z-index: 6;
}
/*.music {
  color: white;
  font-size: 30px;
  position: relative;
  top: 20%;
  left: 5%;
}
.box {
  width: 200px;
  height: 100px;
  color: #ff4b00;
  background-color: white;
  border: 10px solid white;
  border-radius: 50px;
  position: relative;
  top: 15%;
  left: 50%;
}*/
.logo {
    color: #fff;
    font-size: 24px;
    line-height: 80px;
    margin-left: 20px;
  }
  .download {
    width: 100px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    font-size: 18px;
    border-radius: 17px;
    background-color: #fff;
    color: #ff4b00;
    float: right;
    margin-right: 10px;
    margin-top: 22px;
  }
.nav {
  width: 100%;
  position: fixed;
  top: 80px;
  left: 0;
  z-index: 6;
  background-color: #fff;
}
.nav .link {
  height: 46px;
  font-size: 20px;
  color: black;
  display: inline-block;
  width: 32%;
  text-align: center;
  line-height: 46px;
}
/* 当页面的url和router-link的to属性值相同时，会自动加上router-link-active这个class */
.nav .link.router-link-active {
  color: #ff4b00;
  text-decoration: underline;
}
.router-view {
  margin-top: 126px;
}
</style>